<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>${SYSTEM_TITLE}-用户登陆</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="/WEB-INF/pages/common/taglibs.jsp"%>
<link rel="stylesheet" type="text/css"
	href="${ctx}resources/css/login/login.css">
<script type="text/javascript">
	if (top.location != self.location) {
		top.location = self.location;
	}
	function login() {
		var username = $("#username").val();
		var password = $("#password").val();
		var validateCode = $("#validateCode").val();
		if (username == "") {
			$.messager.alert("系统提示", "用户名不能为空!", "warning", function() {
				$("#username").focus();
			});
			return;
		}
		if (password == "") {
			$.messager.alert("系统提示", "密码不能为空!", "warning", function() {
				$("#password").focus();
			});
			return;
		}
		if (validateCode == "") {
			$.messager.alert("系统提示", "验证码不能为空!", "warning", function() {
				$("#validateCode").focus();
			});

			return;
		}
		$("#loginForm").submit();
	}
	function rest() {

	}
	function changeCode() {
		var d = new Date();
		$("#code").attr("src", "${ctx}admin/code.htm?code=" + d.getTime());
	}

	$(function() {
		$("#validateCode").keydown(function(event) {
			if (event.keyCode == 13) {
				login();
			}
		});
	});
</script>
</head>

<body>

	<div class="body">
		<div class="warp_top">
			<div class="log_top">
				<img src="${ctx}resources/images/lo1_04.jpg" />
			</div>
			<div class="log_bottom">
				<form id="loginForm" action="${ctx}j_sys_user_login" method="post">
					<div class="log_yi">${SPRING_SECURITY_LAST_EXCEPTION.message}</div>
					<div class="log_yi2">
						<div class="log_yi2_font">用户名：</div>
						<div class="log_yi2_su">
							<input type="text" class="text1" name="username" id="username" />
						</div>
					</div>
					<div class="log_yi2">
						<div class="log_yi2_font">密&nbsp;码：</div>
						<div class="log_yi2_su">
							<input type="password" class="text1" name="password"
								id="password" />
						</div>
					</div>
					<c:if test="${SYSTEM_VERIFY!=null}">
						<div class="log_yi2">
							<div class="log_yi2_font">验证码：</div>
							<div class="log_yi2_su2">
								<input type="text" class="text2" name="validateCode"
									id="validateCode" />
							</div>
								<div class="log_yi2_font2">
									<a href="#" onclick="changeCode()"><img id="code"
										src="${ctx}admin/code.htm" title="看不清？点击换一个!" alt="看不清？点击换一个!" /></a>
								</div>
						</div>
					</c:if>
					<div class="log_yi3">
						<div class="log_yi_b">
							<a href="#" onclick="login()" id="login"><img
								src="${ctx}resources/images/btn_login.gif" /></a>
						</div>
						<div class="log_yi_b">
							<a href="#"><img src="${ctx}resources/images/btn_reset.gif" /></a>
						</div>
					</div>
				</form>
			</div>
		</div>
		<div style="padding-top: 10px; font-size: 16px; font-family: 微软雅黑">版权所有
			锐信工作室 CQAN.COM</div>
	</div>
</body>
</html>
